package com.djx.threadstudy.Thread;

/**
 * @ClassName ThreadJoin
 * @Date 2021/7/9 0009 上午 9:27
 * @Author Administrator
 * @Description TODO
 * Version 1.0
 */
public class ThreadJoinTest01 implements Runnable {
    @Override
    public void run() {
        for (int i = 1; i <=9; i++) {
            System.out.println(Thread.currentThread().getName() + "__runnable__" + i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        ThreadJoinTest01 ThreadJoin = new ThreadJoinTest01();
        Thread oneThread = new Thread(ThreadJoin, "张三");
        Thread twoThread = new Thread(ThreadJoin, "李四");
        Thread threeThread = new Thread(ThreadJoin, "王五");
        oneThread.start();
        oneThread.join();
        twoThread.start();
        twoThread.join();
        threeThread.start();

    }
}
